﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Core.Interfaces.IPresenters;

namespace Core.Views
{
    public partial class BuyingView : Form, IBuyingView
    {
        public BuyingView()
        {
            InitializeComponent();
        }

        public event EventHandler BuyNow;

        public BindingSource Building
        {
            get { return iBuildingBindingSource; }
            set { iBuildingBindingSource = value; }
        }

        public BindingSource Customer
        {
            get { return iCustomerBindingSource; }
            set { iCustomerBindingSource = value; }
        }

        public string EndPrice
        {
            get { return label10.Text; }
            set { label10.Text = value; }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            if (BuyNow != null)
            {
                BuyNow(this, null);
            }
        }
    }
}
